
function getxlsx(pathName,num,callback){

    // 读取 Excel 文件
    var file = pathName; // XLSX 文件的路径，假设文件名为 "data.xlsx"/'+pathName+'

    var req = new XMLHttpRequest();
    req.open('GET', file, true);
    req.responseType = 'arraybuffer';

    req.onload = function(e) {
        var data = new Uint8Array(req.response);
        var workbook = XLSX.read(data, { type: 'array' });

        // 读取第一个工作表
        var worksheet = workbook.Sheets[workbook.SheetNames[num]];

        // 将工作表数据转换为 JSON 对象
        var jsonData={}
         jsonData = XLSX.utils.sheet_to_json(worksheet, { header: 1 });
        var uniqueArr = jsonData.filter((value, index, self) => {
            return self.findIndex(jsonData => jsonData.every((val, idx) => val === value[idx])) === index;
        });
        callback(uniqueArr)
        }

    req.send();
}
